package com.wanmait.zaisousuo.webcontroller;

import com.alibaba.fastjson.JSON;
import com.wanmait.zaisousuo.service.CityService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

@Controller
@RequestMapping("/web/inc")
public class PageWebController {

    @Resource
    private CityService cityService;
    @RequestMapping("header")
    public ModelAndView header(){
        ModelAndView mv=new ModelAndView();
        mv.addObject("provinces", JSON.toJSON(cityService.findProvince()));
        return mv;
    }

    @RequestMapping("footer")
    public void footer(){}
}
